<template>
  <el-table
    :data="tableData"
    border
    style="width: 100%"
  >
    <el-table-column
      label="名称"
      width="180"
    ><template v-slot="scope">
      <span style="font-weight: bold;">{{ scope.row.name }}</span>
    </template>
    </el-table-column>
    <el-table-column
      label="内容"
    ><template v-slot="scope">
      <el-checkbox v-model="scope.row.checked" style="display:flex;align-items:center;">底盘车接线正确;联锁传动润滑；联锁功能稳定；绝缘护套清洁；护套与触臂、极柱贴合无缝隙;<br>导电面清洁;螺钉达到力矩要求并作防松标记。底盘车接线正确;<br>联锁传动润滑；联锁功能稳定；绝缘护套清洁；护套与触臂、极柱贴合无缝隙;导电面清洁;<br>螺钉达到力矩要求并作防松标记。</el-checkbox>
    </template>
    </el-table-column>
  </el-table>
</template>
<script>
/**
 * @Date: 2022/4/4
 */

export default {
  name: 'Question6',
  model: {
    prop: 'modelValue',
    event: 'change'
  },
  props: {
    modelValue: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      tableData: [{
        name: '底盘车触臂触头安装',
        checked: false
      }]
    }
  },
  watch: {
    tableData: {
      handler(newVal, oldVal) {
        if (newVal[0].checked) {
          this.$emit('change', { check1: '√',fe:'' })
        } else {
          this.$emit('change', { check1: '□',fe:'未填写完整' })
        }
      },
      deep: true
    }
  },
  created() {
    if (Object.keys(this.modelValue).length === 0 || this.modelValue['check1'] === '□') {
      this.$emit('change', { check1: '□' })
    } else {
      this.tableData[0].checked = true
    }
  },
  methods: {
    print(x) {
      console.log(x)
    }
  }
}
</script>

<style scoped>

</style>
